package com.xkcyy.nacos.springcloud.nacos.userservice.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * User1Controller
 *
 * @author xkcyy
 * @date 2022/5/18
 **/
@RestController
public class User1Controller {
    @Value("${server.port}")
    private String port;
    @GetMapping("/user1/getname")
    public Object getName() {
        HashMap<String, Object> map  = new HashMap<>();
        map.put("ip:port",port);
//        map.put("123","asdf");
        return map;
    }
}
